MailActivitySetting=function (editor) {
	this.editor = editor;
	this.setting = this.getCurrentAttributeSetting("mail");
};

mxUtils.extend(MailActivitySetting, AttributeSetting);

/**
 * 渲染邮件活动属性设置页面
 */
MailActivitySetting.prototype.renderSetting = function() {
	var basicAttrRegion = $('#ef_region_basicAttr');
	$('#name', basicAttrRegion)
			.attr('value', this.setting.getAttribute('Name'));
	$('#displayName', basicAttrRegion).attr('value',
			this.setting.getAttribute('DisplayName'));
	/*$('#description', basicAttrRegion).attr('value',
			this.setting.getAttribute('Description'));*/
	document.getElementById('description').value=this.setting.getAttribute('Description');
	$('#from', basicAttrRegion).attr('value',
			this.setting.getAttribute('From'));
	$('#to', basicAttrRegion).attr('value',
			this.setting.getAttribute('To'));
	$('#subject', basicAttrRegion).attr('value',
			this.setting.getAttribute('Subject'));
	/*$('#html', basicAttrRegion).attr('value',
			this.setting.getAttribute('Html'));*/
	document.getElementById('html').value=this.setting.getAttribute('Html');
	
};
/**
 * 保存邮件活动属性设置
 */
MailActivitySetting.prototype.updateSetting = function() {
	// 获取活动属性配置
    var name = $('#name').val();
    var displayName = $('#displayName').val();
    var description = $('#description').val();
    var from = $('#from').val();
    var to = $('#to').val();
    var subject = $('#subject').val();
    var html = $('#html').val();


	// 设置基本属性
	var cas = this.setting;
	cas.setAttribute('Name', name);
	cas.setAttribute('DisplayName', displayName);
	cas.setAttribute('Description', description);
	cas.setAttribute('From', from);
	cas.setAttribute('To', to);
	cas.setAttribute('Subject', subject);
	cas.setAttribute('Html', html);

	this.updateAttributeSetting();
};